package com.bwie.config;


import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * @Auther:${涛}
 * @Date:2024/8/30 20:26
 * @Description: RabbitMq
 * @Version 1.0.0
 */
@Configuration
public class RabbitMq {

    @Bean
    public Queue queue() {
        return new Queue("0830", true);
    }


    @Bean
    public FanoutExchange fanoutExchange() {
        return new FanoutExchange("2202-08-30", true, false);
    }

    @Bean
    public Binding binding() {
        return BindingBuilder.bind(queue()).to(fanoutExchange());
    }
}


